<template>
  <div class="footer">
    <ul>
      <router-link tag="li" to="/home">
        <span class="iconfont icon-shouyefill"></span>
        <p>首页</p>
      </router-link>
      <router-link tag="li" to="/kinds">
        <span class="iconfont icon-kinds"></span>
        <p>分类</p>
      </router-link>
      <router-link tag="li" to="/cart">
        <span class="iconfont icon-cart-Empty"></span>
        <p>购物车</p>
      </router-link>
      <router-link tag="li" to="/mine" v-if="flag">
        <span class="iconfont icon-wodejuhuasuan"></span>
        <p>我的</p>
      </router-link>
      <router-link tag="li" to="/mine" v-else>
        <span class="iconfont icon-wodejuhuasuan"></span>
        <p>未登录</p>
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  data () {
    return {
      token:localStorage.getItem("token")
    }
  },
  computed: {
    flag(){
      if(this.token){
        return true
      }else{
        return false
      }
    }
  }
};
</script>

<style>
</style>